Contents
Extract sub-file
Convert markers to events
Contiguous sub-files
Extract regions of interest
Collapse regions of interest
Extract Sub-File(s)
If you have a very large data file you may want to break it up into a series of smaller files to improve loading speed and make analysis more convenient. This tutorial illustrates various ways of doing this.
- Load the file sub-file.
This shows an imaginary experiment in which 2 drugs (abc and xyz) were applied to a preparation, each followed by a wash. The experimenter used markers to indicate the conditions.
- Select the Transform: Extract sub-file(s) menu command to open the Extract sub-file(s) dialog (the commandis also available on the File menu).
You have to tell the dialog which section(s) of the main file to extract. Initially, only the first 2 options are available - if you had placed 2 vertical cursors in the main view before opening the dialog, the third option would also be available. Hopefully these options are self explanatory.
The remaining options require events to define the sub-regions to extract. Our file does not have events, but it does have markers, and these can be converted into events.
- Close the Extract sub-file(s) dialog.
Convert markers to events
- Select the Event edit: Convert markers to events menu command to open the Convert Markers to Events dialog (also available on the Add ins: Markers menu).
- Click OK to accept the default parameters.
You now have a series of point process events in channel a corresponding to each marker. Furthermore, the marker labels have been incorporated as event labels. You now have several ways of extracting sub-files.
Extract contiguous sub-files
- Open the Extract sub-file(s) dialog as before.
- Select the Separate files (autoincrement names) option.
- Check the Contiguous data box.
- Check the Append label box.
- Uncheck the Write new file box.
- Click OK.
Five new files are loaded into DataView, with filenames that start "sub-file x" where x is a number that increments from 1 to 5. (If you had not unchecked Write new file, the files would start with a new name that you had chosen.) The first file contains data from the start of the recording up to the first event, and has "start record" appended after the number 1. Subsequent files contain data from the start of one event until the start of the next event (or the end of the file for the last event), and have the event label (if any) appended after the number.
- Close and delete the 5 new files (just to clean up your disk a bit).
Extract regions of interest
You may want to only extract the sections containing experimental data (or other regions of interest). This would be appropriate if you had a long recording, in which only a small part contained anything interesting. You have to mark each region of interest with an event spanning its duration. We can do this from our point process events as follows.
- Select the Event edit: Define from label text menu command to open the Define Events from Labels dialog.
- Enter "drug" into the Start edit box.
- Enter "wash" into the Finish edit box.
- Click OK.
With the default settings the procedure finds the first event in the source channel that has a label that contains the text "drug" and then looks for the next event whose label contains the word "wash". A new event is written to the destination channel that encompasses these two events in the source channel. The process then repeats. Any unmatched events are ignored. The start search text ("drug" in this case) becomes the event channel label, while any additional text in the original event labels becomes event labels for the new events.
At this point there should be 2 events in channel b that span the drug - wash events in channel a. The event labels should be "abc" and "xyz".
- Open the Extract sub-file(s) dialog as before.
- Check the Separate files (autoincrement names) option.
- Set the event channel to b.
- Do NOT check the Contiguous data box.
- Check the Append label box.
- Uncheck the Write new file box.
- Click OK.
This time just 2 files are written, containing the data within the events of channel b. The naming convention is as before, making the new file names "sub-file 1 abc" and "sub-file 2 xyz".
- Close and delete the 2 new files.
Collapse regions of interest
If you just want to remove unwanted sections of a file you can do this as follows, assuming that the regions of interest that you want to keep are marked with events as above.
- Open the Extract sub-file(s) dialog as before.
- Check the Single file (erase gaps) option.
- Set the event channel to b.
- Do NOT uncheck the Write new file box.
- Click OK.
When the new file loads (with whatever name you chose) note it only contains data from within events in the specified channel in the source file (i.e. the gaps have been erased). Also note that event channel a in the new file contains tagged point-process events that mark the beginning of each data section.